package py.progweb.sgc.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the ATRIBEVENTOS database table.
 * 
 */
@Entity
@Table(name="ATRIBEVENTOS")
public class AtributoEvento extends EntidadBase implements Serializable {
	private static final long serialVersionUID = 1L;
	private long codAtribeventoPk;
	private String enumTipo;
	private String strCamporigen;
	private String strDescrip;
	private String strNombre;
	private Evento evento;
	private Set<ValorAtributoEvento> valatribeventos;

    public AtributoEvento() {
    }


	@Id
	@SequenceGenerator(name="ATRIBEVENTOS_CODATRIBEVENTOPK_GENERATOR", sequenceName="SQ_PK_ATRIBEVENTOS")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ATRIBEVENTOS_CODATRIBEVENTOPK_GENERATOR")
	@Column(name="COD_ATRIBEVENTO_PK")
	public long getCodAtribeventoPk() {
		return this.codAtribeventoPk;
	}

	public void setCodAtribeventoPk(long codAtribeventoPk) {
		this.codAtribeventoPk = codAtribeventoPk;
	}


	@Column(name="ENUM_TIPO")
	public String getEnumTipo() {
		return this.enumTipo;
	}

	public void setEnumTipo(String enumTipo) {
		this.enumTipo = enumTipo;
	}


	@Column(name="STR_CAMPORIGEN")
	public String getStrCamporigen() {
		return this.strCamporigen;
	}

	public void setStrCamporigen(String strCamporigen) {
		this.strCamporigen = strCamporigen;
	}


	@Column(name="STR_DESCRIP")
	public String getStrDescrip() {
		return this.strDescrip;
	}

	public void setStrDescrip(String strDescrip) {
		this.strDescrip = strDescrip;
	}


	@Column(name="STR_NOMBRE")
	public String getStrNombre() {
		return this.strNombre;
	}

	public void setStrNombre(String strNombre) {
		this.strNombre = strNombre;
	}


	//bi-directional many-to-one association to Evento
    @ManyToOne
	@JoinColumn(name="COD_EVENTO")
	public Evento getEvento() {
		return this.evento;
	}

	public void setEvento(Evento evento) {
		this.evento = evento;
	}
	

	//bi-directional many-to-one association to Valatribevento
	@OneToMany(mappedBy="atributoEvento")
	public Set<ValorAtributoEvento> getValatribeventos() {
		return this.valatribeventos;
	}

	public void setValatribeventos(Set<ValorAtributoEvento> valatribeventos) {
		this.valatribeventos = valatribeventos;
	}


	@Override
	public Object getPK() {
		return getCodAtribeventoPk();
	}
	
}